package com.cai.kcsj.service.impl;

import com.cai.kcsj.entity.Order;
import com.cai.kcsj.mapper.OrderMapper;
import com.cai.kcsj.service.OrderServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/1/5 13 : 13
 * @package：com.cai.kcsj.service.impl
 */
@Service
public class OrderServerImpl implements OrderServer {


    @Autowired
    private OrderMapper orderMapper;
    @Override
    public void buyOrder(Order order) {
        orderMapper.buyOrder(order);
    }

    @Override
    public List<Order> getOrder(Integer id,Integer current) {

        return orderMapper.getOrder(id,current);
    }

    @Override
    public void deleteorder(Integer id) {
        orderMapper.deleteorder(id);
    }
    @Override
    public int orderCount(Integer id) {
        return orderMapper.orderCount(id);
    }


}
